<?php

namespace App\Model;

use App\Model\Admin\Admin;
use Hyperf\Database\Model\Relations\BelongsTo;

/**
 * 审核
 */
class Finance extends Model
{
    protected ?string $table = 'finance';

    protected array $fillable = [
        'id', 'admin_id', 'money', 'remark',
        'created_at', 'updated_at', 'distributor_id', 'balance', 'new_balance',
        'card','card_name','card_user'
    ];

    public function admin(): BelongsTo
    {
        return $this->belongsTo(Admin::class, 'admin_id', 'id');
    }

    public function distributor(): BelongsTo
    {
        return $this->belongsTo(Distributors::class, 'distributor_id', 'id');
    }
}
